<template>
  <div>
    <van-grid :column-num="5">
      <van-grid-item
        v-for="item in serviceList"
        :key="item.id"
        :icon="
          item.imgUrl ? 'http://124.93.196.45:10001/' + item.imgUrl : item.url
        "
        :text="item.serviceName"
        @click="jump(item.link)"
      />
    </van-grid>
  </div>
</template>

<script>
export default {
  props: ["serviceList"],
  methods: {
    jump(path) {
      this.$router.push(path);
    },
    gotoDetail(index, item) {
      if (index == this.serviceList.length - 1) {
        this.$router.push("/service");
      } else {
        let link = item.link;
        this.$router.push(link);
        console.log(link);
      }
    }
  
}
}
</script>

<style lang="scss" scoped></style>
